package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.CheckGroupItemMapper;
import com.itheima.pojo.CheckGroupItem;
import com.itheima.service.CheckGroupItemService;
import com.itheima.service.CheckGroupService;
import org.apache.dubbo.config.annotation.Service;

/**
 * @author jshstart
 * @creat 2020-11-12 17:28
 */
@Service
public class CheckGroupItemServiceImpl extends ServiceImpl<CheckGroupItemMapper, CheckGroupItem> implements CheckGroupItemService {
    @Override
    public Integer[] findItemByGroup(Integer id) {
        Integer[] ids=baseMapper.findItemByGroup(id);
        return ids;
    }

    @Override
    public void deleteById(Integer groupId) {
        QueryWrapper<CheckGroupItem> wrapper = new QueryWrapper<>();
        wrapper.eq("group_id",groupId);
        this.remove(wrapper);
    }
}
